import java.util.List;
import java.util.Scanner;

/*
 *  Test space to check the functionalities and outputs of the CheckersState class.
 */

public class StateTester {
	public static void main(String [] args){
		Scanner scan = new Scanner(System.in);
		String start = initializeBoard();
		String jumpTest = "EEEEEBEBEBEBEEEEEEEEEEEEEEEBEEEE"+
					   	  "EEEEWEEEEEEEEEEEEEEEEEEEEEEEEEEE";
		String p1 = "Bob";
		String p2 = "Steve";
		
		CheckersState myGame;
		List<Move> actList;
	
		System.out.print("(1) for initial state of checkers board. (2) for jump test case: ");
		int testRun = scan.nextInt();
		if(testRun == 1){
			myGame = new CheckersState(initializeBoard(),p1,p2,p2);
			actList = myGame.actions();
		}
		else{
			myGame= new CheckersState(jumpTest,p1,p2,p2);
			actList = myGame.actions();
		}
		
		System.out.println("Initial state: ");
		myGame.printBoard();
		System.out.println("First Move: " + actList.get(0).toString());
		
		
		while(!actList.isEmpty()){
			System.out.println(actList.remove(0));
		}
		
	}
	
	private static String initializeBoard(){
		return "EBEBEBEBBEBEBEBEEBEBEBEBEEEEEEEE"+
				   "EEEEEEEEWEWEWEWEEWEWEWEWWEWEWEWE";
	}
}
